﻿CREATE TABLE [dbo].[Company] (
    [Id]           UNIQUEIDENTIFIER CONSTRAINT [DF_Company_Id] DEFAULT (newid()) NOT NULL,
    [Name]         NVARCHAR (128)   NOT NULL,
    [DateActive]   DATE             CONSTRAINT [DF_Company_DateActive] DEFAULT (getdate()) NOT NULL,
    [DateInactive] DATE             NULL,
    CONSTRAINT [PK_Company] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_Company]
    ON [dbo].[Company]([Name] ASC);

